package com.masiyi.controller;


import com.alibaba.dubbo.config.annotation.Reference;
import com.masiyi.entity.User;
import com.masiyi.service.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Reference(version = "1.0.1")//远程注入
    private UserService userService;


    @GetMapping("/user")
    public String user() throws InterruptedException {
        User user1 = new User();
        user1.setName("王富贵");
        String user = userService.queryUser(user1);
        return user;
    }
}
